<template>
	<div>
		<jk-button
			type="primary"
			icon="el-icon-finished"
			:loading="loading"
			:has-permission="getPermission([`${permissionPrefix}:update`])"
			:disabled="disabled"
			:size="size"
			@click="onClickEvent"
		>更新</jk-button>
	</div>
</template>
<script>
    import permissionMixin from '../../../mixins/permission-mixin';

    export default {
        name: 'JkUpdateButton',
        mixins: [permissionMixin],
        props: {
            permissionPrefix: {
                type: String,
                default: ''
            },
            disabled: {
                type: Boolean,
                default: false
            },
            loading: {
                type: Boolean,
                default: false
            },
            size: {
                type: String,
                default: 'small'
            },
            usePurview: { // 是否使用权限，false代表这个按钮不需要权限来控制
                type: Boolean,
                default: true
            }
        },
        data() {
            return {

            };
        },
        methods: {
            onClickEvent() {
                this.$emit('click');
            }
        }

    };
</script>
